#include"test.h"

int main(int argc,char* argv[])
{
  cout<<"please enter input file name:"<<endl;
  string iname;
  cin>>iname;
  ifstream ifs{iname};
  if(!ifs)
    cerr<<"can't open the input file!"<<endl;

  cout<<"please enter output file name:"<<endl;
  string oname;
  cin>>oname;
  ofstream ofs{oname};
  if(!ofs)
    cerr<<"can't open output file!"<<endl;

  vector<Year> years;
  while(true)
    {
      Year y;
      if(!(ifs>>y))
	break;
      years.push_back(y);
    }
  cout<<"read "<<years.size()<<" years of readings"<<endl;

  // for(Year& y:years)
  //print(ofs,y);
  return 0;
}
